package de.Objects;

import javax.media.j3d.BranchGroup;
import javax.media.j3d.Transform3D;
import javax.media.j3d.TransformGroup;
import javax.vecmath.Vector3f;

public class createMills extends BranchGroup {
	
	BranchGroup root = new BranchGroup();
	
	public createMills(){
		createMill();
		super.addChild(root);
	}
	
	public void createMill(){
		Transform3D t1 = new Transform3D();
		t1.rotY(Math.PI/1.01);
		t1.setScale(0.06f);
		t1.setTranslation(new Vector3f(0.7f, 0.5f, 0.7f));
		TransformGroup tg1 = new TransformGroup(t1);
		de.muehle.MuehleModelle m1 = new de.muehle.MuehleModelle();
		root.addChild(tg1);
		tg1.addChild(m1);
		
		Transform3D t2 = new Transform3D();
		t2.setScale(0.06f);
		t2.setTranslation(new Vector3f(-0.7f, 0.5f, -0.7f));
		TransformGroup tg2 = new TransformGroup(t2);
		de.muehle.MuehleModelle m2 = new de.muehle.MuehleModelle();
		root.addChild(tg2);
		tg2.addChild(m2);
		
		Transform3D t3 = new Transform3D();
		t3.setScale(0.2f);
		t3.setTranslation(new Vector3f(-5.8f, -0.4f, 5.5f));
		TransformGroup tg3 = new TransformGroup(t3);
		de.muehle.MuehleModelle m3 = new de.muehle.MuehleModelle();
		root.addChild(tg3);
		tg3.addChild(m3);
		
		Transform3D t4 = new Transform3D();
		t4.rotY(Math.PI/1.01);
		t4.setScale(0.2f);
		t4.setTranslation(new Vector3f(5.8f, -0.4f, -5.5f));
		TransformGroup tg4 = new TransformGroup(t4);
		de.muehle.MuehleModelle m4 = new de.muehle.MuehleModelle();
		root.addChild(tg4);
		tg4.addChild(m4);
	}
}